<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_course_signin_info".
 *
 * @property string $id 主键
 * @property string $title 签到名称
 * @property string $party_id 班级id
 * @property string $course_id 课程id
 * @property string $user_id 用户id
 * @property string $start_time 开始时间
 * @property string $end_time 结束时间
 * @property string $code 签到码/手势/二维码值
 * @property string $type 签到类型（普通/扫码/位置/手势）
 * @property string $is_location 是否需要位置签到(0:否,1:是)
 * @property string $location_address 签到位置坐标
 * @property string $major_id
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 * @property string $status
 * @property string $latitude 维度
 * @property string $longitude 经度
 * @property int $publishStatus 0为未发布，1为已发布
 * @property string $old_id 对应3.0的签到列表id
 */
class TCourseSigninInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_course_signin_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'party_id', 'create_time'], 'required'],
            [['party_id'], 'string'],
            [['start_time', 'end_time', 'create_time', 'update_time'], 'safe'],
            [['del_flag', 'publishStatus'], 'integer'],
            [['latitude', 'longitude'], 'number'],
            [['id', 'course_id', 'user_id', 'major_id', 'create_by', 'update_by', 'old_id'], 'string', 'max' => 36],
            [['title', 'location_address'], 'string', 'max' => 255],
            [['code'], 'string', 'max' => 128],
            [['type', 'is_location', 'status'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'party_id' => 'Party ID',
            'course_id' => 'Course ID',
            'user_id' => 'User ID',
            'start_time' => 'Start Time',
            'end_time' => 'End Time',
            'code' => 'Code',
            'type' => 'Type',
            'is_location' => 'Is Location',
            'location_address' => 'Location Address',
            'major_id' => 'Major ID',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'status' => 'Status',
            'latitude' => 'Latitude',
            'longitude' => 'Longitude',
            'publishStatus' => 'Publish Status',
            'old_id' => 'Old ID',
        ];
    }
}
